<?php

define('ENVIRONMENT', 'DEVELOPMENT'); // 开发环境
//define('ENVIRONMENT','TESTING');     //测试环境
//define('ENVIRONMENT','PRODUCTION');  // 生产环境
define('SYSTEM_DEBUG', true);

return [
    //启用服务设置
    'service' => [
        //服务器IP
        'host' => '0.0.0.0',
        //服务器端口
        'port' => '80',
        'parameters' => [
            'worker_num' => 8,
            'daemonize' => 0,
            'max_request' => 10000,
            'dispatch_mode' => 2,
            'debug_mode' => 1,
        ],
    ],
    'signkey' => 'BIBAO100_DEV_AUTHENTICATION',
    'encryptkey' => 'BIBAO100_DEV_AUTHENTICATION',
    //开启token

    //服务器格式化工具
    'response' => [
        'json' => 'ff\helpers\JsonParser',
        'jsonp' => 'ff\response\jsonp',
        'xml' => 'ff\response\xml',
    ],
    //开启wiki
    'wiki' => [
        'enable' => true,
        'port' => '8080',
        'path' => 'wiki',
    ],
    //cookie 设置
    'cookie' => [
        'cookiepre' => 'wSvr_',
        'cookiedomain' => '',
        'cookiepath' => '/',
    ],
    'components' => [
        'db' => [
            'class' => 'ff\database\db',
            'config' => [
                'default' => 'master',
                'master' => [
                    'dbhost' => 'localhost',
                    'dbuser' => 'test',
                    'dbpw' => '',
                    'dbcharset' => 'utf8',
                    'pconnect' => '0',
                    'dbname' => 'ffapi',
                    'tablepre' => 'pre_',
                ],
            ],
        ],
        'redis' => [
            'class' => 'ff\caching\Redis',
            'config' => [
                'default' => 'master',
                'master' => [
                    'server' => 'localhost',
                    'port' => 6379,
                    'pconnect' => 1,
                    'connect_timeout' => 0,
                    'password' => '',
                    'db' => 1,
                    'prefix' => 'pre_',
                ],
            ],
        ],
    ],
];
